package com.cskaoyan.controller.vx;

import com.cskaoyan.bean.MarketTopic;
import com.cskaoyan.bean.MarketTopicGoods;
import com.cskaoyan.bean.common.BasePageInfo;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.common.CommonData;
import com.cskaoyan.service.VxTopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.xml.crypto.Data;

/***
 * title VxTopicService
 * @description <TODO description class purpose>
 * @author ZCZ
 * @version 1.0.0
 * @create 2022/9/11 23:00
 **/
@RestController
@RequestMapping("wx/topic")
public class VxTopicController {
    @Autowired
    VxTopicService vxTopicService;

    @RequestMapping("list")
    public BaseRespVo list(BasePageInfo info){
        CommonData<MarketTopic> data = vxTopicService.list(info);
        return BaseRespVo.ok(data);
    }

    @RequestMapping("detail")
    public BaseRespVo datail(int id){
        MarketTopicGoods data = vxTopicService.detail(id);
        return BaseRespVo.ok(data);
    }
    @RequestMapping("related")
    public BaseRespVo related(int id){
        CommonData<MarketTopic> data = vxTopicService.related(id);
        return BaseRespVo.ok(data);
    }
}
